package com.ljye.jg.ljye.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.ljye.jg.ljye.R;

public class Activity_Balance extends Activity {
    private Intent intent;
    public View.OnClickListener listener = new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            switch (view.getId()) {
                case R.id.back://返回
                    finish();
                    break;
                case R.id.zhangdan://账单
                    intent = new Intent(Activity_Balance.this, Activity_Bill.class);
                    startActivity(intent);
                    break;
                case R.id.number://余额

                    break;
                case R.id.withdrawals://提现
                    intent = new Intent(Activity_Balance.this, Activity_Withdrawals.class);
                    startActivity(intent);
                    break;
                case R.id.bankcard://银行卡
                    intent = new Intent(Activity_Balance.this, Activity_Bank_Card.class);
                    startActivity(intent);
                    break;
                case R.id.extension://推广记录

                    break;

                default:
                    break;
            }
        }
    };
    private ImageView back;//返回
    private TextView zhangdan;//账单
    private TextView number;//余额
    private LinearLayout withdrawals;//提现
    private LinearLayout bankcard;//银行卡
    private LinearLayout extension;//推广记录

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity__balance);
        initView();

        back.setOnClickListener(listener);
        zhangdan.setOnClickListener(listener);
        number.setOnClickListener(listener);
        withdrawals.setOnClickListener(listener);
        bankcard.setOnClickListener(listener);
        extension.setOnClickListener(listener);


    }

    private void initView() {
        back = (ImageView) findViewById(R.id.back);

        zhangdan = (TextView) findViewById(R.id.zhangdan);
        number = (TextView) findViewById(R.id.number);
        withdrawals = (LinearLayout) findViewById(R.id.withdrawals);
        bankcard = (LinearLayout) findViewById(R.id.bankcard);
        extension = (LinearLayout) findViewById(R.id.extension);

    }
}
